import request from "./request";
let API = "/api";
const api = {
  // 文件上传
  uploadAction() {
    return {
      url: `${API}/base/file/upload/public`,
    };
  },
  // 获取上传文件信息 ids="1,2,3"
  fileFindByIds(ids) {
    return request({
      url: `${API}/base/file/findByIds?ids=${ids}`,
      method: 'get',
    });
  },
  // 获取token
  getToken(params) {
    return request({
      url: `${API}/base/oauth2/token`,
      method: 'post',
      data: params,
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded',
      }
    });
  },
  //登出
  logout(params) {
    return request({
      url: `${API}/base/token/logout`,
      method: 'delete',

    });
  },
  //修改密码
  updatePwd(params) {
    return request({
      url: `${API}/base/user/updatePwd`,
      method: 'put',
      data: params
    });
  },
  //获取用户信息
  queryUserInfo(params) {
    return request({
      url: `${API}/base/user/queryUserInfo`,
      method: 'get',
      data: params,
    });
  },
  // 获取 省 数据
  baseProvinceTree() {
    return request({
      url: `${API}/monitor/baseProvince/tree`,
      method: 'get',
    });
  },
  // 获取 市 数据
  baseCityTree(id) {
    return request({
      url: `${API}/monitor/baseCity/tree?provId=${id}`,
      method: 'get',
    });
  },
  // 获取 区 数据
  baseCountyTree(id) {
    return request({
      url: `${API}/monitor/baseCounty/tree?cityId=${id}`,
      method: 'get',
    });
  },
  // 厂商管理 厂商分页列表
  supplierPage(params) {
    return request({
      url: `${API}/monitor/supplier/page`,
      method: 'get',
      data: params,
    });
  },
  // 厂商管理 厂商全量列表
  supplierList(params) {
    return request({
      url: `${API}/monitor/supplierType/getSupplierTypeTree`,
      method: 'get',
      data: params,
    });
  },
  // 厂商管理 新增/编辑
  supplier(params, method) {
    return request({
      url: `${API}/monitor/supplier`,
      method,
      data: params,
    });
  },
  // 厂商管理 删除
  supplierDel(id) {
    return request({
      url: `${API}/monitor/supplier?id=${id}`,
      method: 'delete',
    });
  },
  // 型号管理 型号分页列表
  supplierTypePage(params) {
    return request({
      url: `${API}/monitor/supplierType/page`,
      method: 'get',
      data: params,
    });
  },
  // 型号管理 新增/编辑/删除
  supplierType(params, method) {
    return request({
      url: `${API}/monitor/supplierType`,
      method,
      data: params,
    });
  },
  // 型号管理删除 删除
  supplierTypeDel(id) {
    return request({
      url: `${API}/monitor/supplierType?id=${id}`,
      method: 'delete',
    });
  },
  // 型号管理 关联项目
  getRelatedstations(params) {
    return request({
      url: `${API}/monitor/supplierType/getRelatedStations`,
      method: 'get',
      data: params,
    });
  },
  // 型号管理 关联项目
  supplierTypeTree(params) {
    return request({
      url: `${API}/monitor/supplierType/getSupplierTypeTree`,
      method: 'get',
      data: params,
    });
  },
  // 型号管理 厂商类别枚举
  brandEnum() {
    return request({
      url: `${API}/monitor/other/enum/brandEnum`,
      method: 'get',
    });
  },
  // 模版管理 类别下拉
  modelCategoryTypeList(params) {
    return request({
      url: `${API}/monitor/model/category/type/list`,
      method: 'get',
      data: params,
    });
  },
  // 模版管理 模版类别下拉
  modelTypeList(params) {
    return request({
      url: `${API}/monitor/model/type/list`,
      method: 'get',
      data: params,
    });
  },
  // 模版管理 模版类别
  modelPage(params) {
    return request({
      url: `${API}/monitor/model/page`,
      method: 'get',
      data: params,
    });
  },
  // 模版管理 新增/编辑
  model(params, method) {
    return request({
      url: `${API}/monitor/model`,
      method,
      data: params,
    });
  },
  // 模版管理 删除 
  modelDel(id) {
    return request({
      url: `${API}/monitor/model?id=${id}`,
      method: 'delete',
    });
  },
  // 模版管理 启用/停用 器部件模版
  updateModelStatus(params) {
    return request({
      url: `${API}/monitor/model/update/enable/status`,
      method: 'get',
      data: params,
    });
  },
  // 型号参数管理 参数分页列表
  modelParamPage(params) {
    return request({
      url: `${API}/monitor/modelParam/page`,
      method: 'post',
      data: params,
    });
  },
  // 型号参数管理 参数列表
  modelParamList(params) {
    return request({
      url: `${API}/monitor/modelParam/list`,
      method: 'get',
      data: params,
    });
  },
  // 型号参数管理 获取储存类别
  modelStorageList() {
    return request({
      url: `${API}/monitor/modelParam/storage/list`,
      method: 'get',
    });
  },
  // 型号参数管理 新增/编辑
  modelParam(params, method) {
    return request({
      url: `${API}/monitor/modelParam`,
      method,
      data: params,
    });
  },
  // 型号参数管理 修改告警点位值
  modelParamUpdateAlarm(params) {
    return request({
      url: `${API}/monitor/paramCode/alarmPoint`,
      method: 'put',
      data: params,
    });
  },
  // 型号参数管理 启用/停用 器部件模板参数点位
  updateModelParamStatus(params) {
    return request({
      url: `${API}/monitor/modelParam/update/enable/status`,
      method: 'get',
      data: params,
    });
  },
  // 型号参数管理 删除 
  modelParamDel(id) {
    return request({
      url: `${API}/monitor/modelParam?id=${id}`,
      method: 'delete',
    });
  },
  // 型号参数管理 下载模板 
  modelParamDownload(params) {
    return request({
      url: `${API}/monitor/modelParam/download/example/file`,
      headers: {
        "octet-stream": true,
        responseType: "blob",
      },
      responseType: "blob",
      method: "get",
      data: params,
    });
  },
  // 型号参数管理 导入
  modelParamImport() {
    return request({
      url: `${API}/monitor/modelParam/import`,
      method: 'post',
    });
  },
  // 参数映射管理 分页
  paramCodePage(params) {
    return request({
      url: `${API}/monitor/paramCode/page`,
      method: 'get',
      data: params,
    });
  },
  // 参数映射管理 列表
  paramCodeList(params) {
    return request({
      url: `${API}/monitor/paramCode/list`,
      method: 'get',
      data: params,
    });
  },
  // 参数映射管理 新增/编辑/删除
  paramCode(params, method) {
    return request({
      url: `${API}/monitor/paramCode`,
      method,
      data: params,
    });
  },
  // 参数映射管理 关联模版参数
  paramCodeDetails(params) {
    return request({
      url: `${API}/monitor/paramCode/details`,
      method: 'get',
      data: params,
    });
  },
  // 参数映射管理 关联模版参数
  paramCodeRelate(params) {
    return request({
      url: `${API}/monitor/paramCode/relate`,
      method: 'post',
      data: params,
    });
  },
  // 参数映射管理 解除绑定
  paramCodeRelateRelease(params) {
    return request({
      url: `${API}/monitor/paramCode/relateRelease`,
      method: 'post',
      data: params,
    });
  },
  // 参数集合管理 分页
  paramCodeCollectPage(params) {
    return request({
      url: `${API}/monitor/paramCodeCollect/page`,
      method: 'get',
      data: params,
    });
  },
  // 参数集合管理 新增/编辑/删除
  paramCodeCollect(params, method) {
    return request({
      url: `${API}/monitor/paramCodeCollect`,
      method,
      data: params,
    });
  },
  // 参数集合管理 删除
  paramCodeCollectDel(id) {
    return request({
      url: `${API}/monitor/paramCodeCollect?id=${id}`,
      method: 'delete',
    });
  },
  // 参数集合管理 查看
  paramCodeCollectDetails(params) {
    return request({
      url: `${API}/monitor/paramCodeCollect/details`,
      method: 'get',
      data: params,
    });
  },
  // 参数集合管理 解除绑定
  paramCodeCollectRemoveParamCode(params) {
    return request({
      url: `${API}/monitor/paramCodeCollect/removeParamCode?id=${params.id}&paramCodeId=${params.paramCodeId}`,
      method: 'delete',
    });
  },
  // 设备接入 电站分页
  companyStationtPage(params) {
    return request({
      url: `${API}/monitor/companyStation/page`,
      method: 'get',
      data: params,
    });
  },
  // 设备接入 电站列表
  companyStationtList(params) {
    return request({
      url: `${API}/monitor/companyStation/tree`,
      method: 'get',
      data: params,
    });
  },
  // 设备接入 电站信息 新增/编辑/删除
  companyStation(params, method) {
    return request({
      url: `${API}/monitor/companyStation`,
      method,
      data: params,
    });
  },
  //设备接入 获取旧系电站列表
  getOldSysStationList(params) {
    return request({
      url: `${API}/monitor/companyStation/getOldSysStationList`,
      method: 'get',
      data: params,
    });
  },
  // 获取企业列表
  companyList(params) {
    return request({
      url: `${API}/monitor/company/tree`,
      method: 'get',
      data: params,
    });
  },
  // 获取企业详情
  companyDetails(params) {
    return request({
      url: `${API}/monitor/company/details`,
      method: 'get',
      data: params,
    });
  },
  // 设备接入 获取资产编码
  assertCode(params) {
    return request({
      url: `${API}/monitor/common/assert/code`,
      method: 'get',
      data: params,
    });
  },
  // 拓扑图 资产编码
  commonAssertCode(stationId) {
    return request({
      url: `${API}/monitor/common/new/assetCode?stationId=${stationId}`,
      method: 'get',
    });
  },
  // 拓扑图 资产编码
  powerBlockAssetCode(deviceId) {
    return request({
      url: `${API}/monitor/common/getPowerBlockChildAssetCode?deviceId=${deviceId}`,
      method: 'get',
    });
  },
  // 设备接入 变压器 新增/编辑/删除
  stationPcs(params, method) {
    return request({
      url: `${API}/monitor/stationTf`,
      method,
      data: params,
    });
  },
  // 设备接入 变压器 信息查询
  stationPcsDetails(pcsId) {
    return request({
      url: `${API}/monitor/stationTf/details/${pcsId}`,
      method: 'get',
    });
  },
  // 设备接入 拓扑图大保存（底部的保存按钮）
  stationTopologyMap(params, method) {
    return request({
      url: `${API}/monitor/stationTopologyMap`,
      method,
      data: params,
    });
  },
  // 储充项目 设备接入 拓扑图大保存（底部的保存按钮）
  chargingStationTopologyMap(params, method) {
    return request({
      url: `${API}/monitor/storage/charging`,
      method,
      data: params,
    });
  },
  // 集装箱项目 设备接入 拓扑图大保存（底部的保存按钮）
  containerStationTopologyMap(params, method) {
    return request({
      url: `${API}/monitor/storage/container`,
      method,
      data: params,
    });
  },
  // 储充项目 单站管理 查看储充项目id
  getChargingIds(chargingId) {
    return request({
      url: `${API}/monitor/storage/charging/relation/${chargingId}`,
      method: 'get',
    });
  },
  // 设备接入 拓扑图小保存（右侧配置后保存后调用，防止用户保存了器部件之后，直接关掉页面没有去点大保存）
  stationTopologyMapSave(params, method) {
    return request({
      url: `${API}/monitor/stationTopologyMap/topology/map`,
      method,
      data: params,
    });
  },
  // 设备接入 查看拓扑图
  stationTopologyMapDetails(stationId) {
    return request({
      url: `${API}/monitor/stationTopologyMap/details/${stationId}`,
      method: 'get',
    });
  },
  // 设备接入 环网柜 新增/编辑/删除
  stationRingMainUnit(params, method) {
    return request({
      url: `${API}/monitor/stationRingMainUnit`,
      method,
      data: params,
    });
  },
  // 设备接入 环网柜 信息查询
  stationRingMainUnitDetails(pcsId) {
    return request({
      url: `${API}/monitor/stationRingMainUnit/details/${pcsId}`,
      method: 'get',
    });
  },
  // 设备接入 并网柜 新增/编辑/删除
  stationGridConnect(params, method) {
    return request({
      url: `${API}/monitor/stationGridConnect`,
      method,
      data: params,
    });
  },
  // 设备接入 并网柜 信息查询
  stationGridConnectDetails(pcsId) {
    return request({
      url: `${API}/monitor/stationGridConnect/details/${pcsId}`,
      method: 'get',
    });
  },
  // 设备接入 电池堆（电源柜） 新增/编辑/删除
  energyLink(params, method) {
    return request({
      url: `${API}/monitor/energyLink`,
      method,
      data: params,
    });
  },
  // 设备接入 电池堆（电源柜) 信息查询
  energyLinkDetails(pcsId) {
    return request({
      url: `${API}/monitor/energyLink/details/${pcsId}`,
      method: 'get',
    });
  },
  // 设备接入 电池堆（电源柜） 分页列表
  energyLinkPage(params) {
    return request({
      url: `${API}/monitor/energyLink/page`,
      method: 'get',
      data: params,
    });
  },
  // 设备接入 储充 新增/编辑
  chargingBlock(params, method) {
    return request({
      url: `${API}/monitor/storage/charging/charging`,
      method,
      data: params,
    });
  },
  // 设备接入 储充 信息查询
  chargingBlockDetails(chargingId) {
    return request({
      url: `${API}/monitor/storage/charging/charging/${chargingId}`,
      method: 'get',
    });
  },
  // 设备接入 集装箱 新增/编辑
  containerBlock(params, method) {
    return request({
      url: `${API}/monitor/storage/container/container`,
      method,
      data: params,
    });
  },
  // 设备接入 集装箱 右侧信息查询
  containerDetails(containerId) {
    return request({
      url: `${API}/monitor/storage/container/container/${containerId}`,
      method: 'get',
    });
  },
  // 设备接入 集装箱 子级电池簇id信息查询
  containerRelation(containerId) {
    return request({
      url: `${API}/monitor/storage/container/relation/${containerId}`,
      method: 'get',
    });
  },
  //电池堆列表
  energyLinkList(params) {
    return request({
      url: `${API}/monitor/energyLink/list`,
      method: 'get',
      data: params,
    })
  },
  //电池簇列表
  powerBlockList(params) {
    return request({
      url: `${API}/monitor/powerBlock/list`,
      method: 'get',
      data: params,
    })
  },
  // 设备接入 电池簇（电池组） 新增/编辑/删除
  powerBlock(params, method) {
    return request({
      url: `${API}/monitor/powerBlock`,
      method,
      data: params,
    });
  },
  // 设备接入 电池簇（电池组） 信息查询
  powerBlockDetails(pcsId) {
    return request({
      url: `${API}/monitor/powerBlock/details/${pcsId}`,
      method: 'get',
    });
  },
  // 设备接入 通用计量电表 新增/编辑/删除
  stationDeviceComponent(params, method) {
    return request({
      url: `${API}/monitor/stationDeviceComponent`,
      method,
      data: params,
    });
  },
  // 设备接入 获取支路关口表列表
  stationGateway(stationId) {
    return request({
      url: `${API}/monitor/stationDeviceComponent/gateway/tree/${stationId}`,
      method: 'get',
    });
  },
  // 设备接入 计量电表 信息查询
  stationDeviceComponentDetails(pcsId) {
    return request({
      url: `${API}/monitor/stationDeviceComponent/details/${pcsId}`,
      method: 'get',
    });
  },
  // 设备接入 通讯协议列表
  mqttAclNewPage(stationId) {
    return request({
      url: `${API}/monitor/mqttAclNew/details/${stationId}`,
      method: 'get',
    });
  },
  // 设备接入 通讯协议 新增/编辑
  mqttAclNew(params, method) {
    return request({
      url: `${API}/monitor/mqttAclNew`,
      method,
      data: params,
    });
  },
  // 设备接入 通讯协议 删除
  mqttAclNewDel(params) {
    return request({
      url: `${API}/monitor/mqttAclNew`,
      method: 'delete',
      data: params,
    });
  },
  // 设备接入 通讯协议 用户 新增/编辑
  mqttUser(params, method) {
    return request({
      url: `${API}/monitor/mqttUser`,
      method,
      data: params,
    });
  },
  // 设备接入 通讯协议 用户信息查询
  mqttUserDetails(stationId) {
    return request({
      url: `${API}/monitor/mqttUser/details/${stationId}`,
      method: 'get',
    });
  },
  // 设备接入 通讯协议 导出
  mqttUserExport(id) {
    return request({
      url: `${API}/monitor/mqttAclNew/export/${id}`,
      method: 'get',
      headers: {
        'octet-stream': true,
        responseType: 'blob',
      },
      responseType: 'blob',
    });
  },
  // 设备接入 导出
  companyStationExport(params) {
    return request({
      url: `${API}/monitor/companyStation/export`,
      method: 'get',
      headers: {
        'octet-stream': true,
        responseType: 'blob',
        getResponse: true,

      },
      getResponse: true,
      responseType: 'blob',
      data: params,
    });
  },
  // 设备接入 通讯协议 根据 电池堆和通讯设备类型 查出idx
  mqttAclNewIdx(params) {
    return request({
      url: `${API}/monitor/mqttAclNew/idx`,
      method: 'get',
      data: params,
    });
  },
  // 设备接入 拓扑图资源器部件列表查询
  modelGraphList(params) {
    return request({
      url: `${API}/monitor/model/graph/list`,
      method: 'get',
      data: params,
    });
  },
  // 菜单管理 新增/编辑菜单
  baseMenu(params, method) {
    return request({
      url: `${API}/base/baseMenu`,
      method,
      data: params,
    });
  },
  // 菜单管理 删除菜单
  baseMenuDel(id) {
    return request({
      url: `${API}/base/baseMenu?id=${id}`,
      method: 'delete',
    });
  },
  // 菜单管理 获取菜单详情
  baseMenuDetails(id) {
    return request({
      url: `${API}/base/baseMenu/${id}`,
      method: 'get',
    });
  },
  // 菜单管理 获取菜单列表
  baseMenuList(params) {
    return request({
      url: `${API}/base/baseMenu/tree`,
      method: 'get',
      data: params,
    });
  },
  // 角色管理 获取角色列表
  roleList(params) {
    return request({
      url: `${API}/base/role/list`,
      method: 'get',
      data: params,
    });
  },
  // 角色管理 新增角色
  baseRole(params, method) {
    return request({
      url: `${API}/base/role`,
      method,
      data: params,
    });
  },
  // 角色管理 删除角色
  roleDel(id) {
    return request({
      url: `${API}/base/role/${id}`,
      method: 'delete',
    });
  },
  // 角色管理 角色详情
  roleDetail(id) {
    return request({
      url: `${API}/base/role/detail/${id}`,
      method: 'get',
    });
  },
  // 角色管理 角色列表
  roleListAll(params) {
    return request({
      url: `${API}/base/role/listAll`,
      method: 'get',
      data: params,
    });
  },
  // 账号管理 列表 page
  userList(params, current, size) {
    return request({
      url: `${API}/base/user/page?current=${current}&size=${size}`,
      method: 'post',
      data: params,
    });
  },
  // 账号管理 列表 list
  userListData(params) {
    return request({
      url: `${API}/base/user/list`,
      method: 'post',
      data: params,
    });
  },
  // 账号管理 列表
  userListById(params) {
    return request({
      url: `${API}/base/user/list`,
      method: 'post',
      data: params,
    });
  },
  // 企业账号管理 列表
  companyUserList(params) {
    return request({
      url: `${API}/base/user/companyUserList`,
      method: 'post',
      data: params,
    });
  },
  // 企业账号管理 批量更新
  userBatch(params) {
    return request({
      url: `${API}/base/user/batch`,
      method: 'put',
      data: params,
    });
  },
  // 账号管理 更新账号
  userAdd(params) {
    return request({
      url: `${API}/base/user/save`,
      method: 'post',
      data: params,
    });
  },
  // 账号管理 更新账号
  userUpdate(params) {
    return request({
      url: `${API}/base/user`,
      method: 'put',
      data: params,
    });
  },
  // 账号管理 删除账号
  userDel(id) {
    return request({
      url: `${API}/base/user/${id}`,
      method: 'delete',
    });
  },
  // 账号管理 重置密码
  userResetPwd(userId, params) {
    return request({
      url: `${API}/base/user/resetPwd/${userId}`,
      method: 'put',
      data: params,
    });
  },
  // 账号管理 获取账号初始密码
  userDefaultPwd(params) {
    return request({
      url: `${API}/base/user/defaultPwd`,
      method: 'post',
      data: params,
    });
  },
  // 账号管理 钉钉同步
  userSync() {
    return request({
      url: `${API}/base/user/sync`,
      method: 'post',
    });
  },
  // 获取部门数据 parentId写死为1
  deptTree() {
    return request({
      url: `${API}/base/dept/tree?parentId=1`,
      method: 'get',
    });
  },
  // 企业管理 分页
  companyPage(params, current, size) {
    return request({
      url: `${API}/monitor/company/page?current=${current}&size=${size}`,
      method: 'post',
      data: params,
    });
  },
  // 企业管理 新增
  companyAdd(params) {
    return request({
      url: `${API}/monitor/company`,
      method: 'post',
      data: params,
    });
  },
  // 企业管理 编辑
  companyUpdate(params) {
    return request({
      url: `${API}/monitor/company`,
      method: 'put',
      data: params,
    });
  },
  // 账号日志
  logPage(params) {
    return request({
      url: `${API}/base/log/page`,
      method: 'get',
      data: params,
    });
  },
  // 摄像头 上传识别二维码
  qrcodeData() {
    return {
      url: `${API}/base/file/qrcode/decode/upload/public`,
    };
  },
  // 摄像头 新增/编辑
  cameraAdd(params, method) {
    return request({
      url: `${API}/base/camera`,
      method,
      data: params,
    });
  },
  // 摄像头 删除
  cameraDel(id) {
    return request({
      url: `${API}/base/camera?id=${id}`,
      method: 'delete',
    });
  },
  // 摄像头 列表
  cameraList(params) {
    return request({
      url: `${API}/base/camera/list`,
      method: 'get',
      data: params,
    });
  },
  // 摄像头 获取播放地址
  cameraPlayUrl(params) {
    return request({
      url: `${API}/base/camera/get/play/url`,
      method: 'post',
      data: params,
    });
  },
  // 摄像头 获取操作萤石云接口的token
  cameraGetToken(params) {
    return request({
      url: `${API}/base/camera/get/token`,
      method: 'get',
      data: params,
    });
  },
  // 摄像头 重启
  cameraReStart(params) {
    return request({
      url: `${API}/base/camera/reboot`,
      method: 'get',
      data: params,
    });
  },
  // 摄像头 萤石云配置
  cameraContinue(params, method) {
    return request({
      url: `${API}/base/camera/continue`,
      method,
      data: params,
    });
  },
  // 单站管理 获取拓扑图实时数据
  stationTopologyMapRealtime(stationId) {
    return request({
      url: `${API}/monitor/stationTopologyMap/realtime/main?stationId=${stationId}`,
      method: 'get',
    });
  },
  // 单站管理 电池堆状态
  stationTopologyMapLinkStatus(stationId) {
    return request({
      url: `${API}/monitor/stationTopologyMap/realtime/status/link?stationId=${stationId}`,
      method: 'get',
    });
  },
  // 单站管理 获取一次接线图
  stationWiringDiagramUrl(stationId) {
    return request({
      url: `${API}/monitor/companyStation/wiringDiagramUrl?stationId=${stationId}`,
      method: 'get',
    });
  },
  //获取组网图
  stationNetworkDiagramUrl(stationId) {
    return request({
      url: `${API}/monitor/companyStation/networkDiagramUrl?stationId=${stationId}`,
      method: 'get',
    });
  },
  // 单站管理 子器部件数据
  stationRealtimeChild(params) {
    return request({
      url: `${API}/monitor/stationTopologyMap/realtime/child`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 故障监控
  warnRecord(params) {
    return request({
      url: `${API}/monitor/warnRecord/page`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 功率曲线
  // line_type： 1-总功率 2-储能功率 3-用户功率 4-SOC 5-计量点总功率 6-计量点储能功率
  // type:  normal 普通   total 总功率 point 功率曲线
  powerCurve(params, type) {
    return request({
      url: `${API}/monitor/showdata/powercurve/${type}`,
      method: 'post',
      data: params,
    });
  },
  // 单站管理 功率曲线 获取支路关口表
  powerCurveBranch(stationId) {
    return request({
      url: `${API}/monitor/showdata/powercurve/branch/list?stationId=${stationId}`,
      method: 'get',
    });
  },
  //单站管理 查看是否存在计量点
  containPoint(params) {
    return request({
      url: `${API}/monitor/companyStation/contain/point`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 充放电曲线 查询某个电站能够支持的数据展示维度
  dischargeDimension(params) {
    return request({
      url: `${API}/monitor/showdata/discharge/curve/dimension`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 充放电曲线 查询数据
  dischargeCurve(params) {
    return request({
      url: `${API}/monitor/showdata/discharge/curve/data`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 BMS电池簇
  bmsCurve(params) {
    return request({
      url: `${API}/monitor/showdata/bms/cluster/realtime`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 电压/电流曲线 线电压
  avVolt(params) {
    return request({
      url: `${API}/monitor/showdata/av/volt`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 电压/电流曲线 相电流
  avAmpere(params) {
    return request({
      url: `${API}/monitor/showdata/av/ampere`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 单体电池
  batteryData(params) {
    return request({
      url: `${API}/monitor/showdata/battery/realtime`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 单体电池界面查询pack电芯信息
  batteryPackInfo(params) {
    return request({
      url: `${API}/monitor/showdata/battery/info`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 单体电池界面查询历史数据
  batteryHistoryData(params) {
    return request({
      url: `${API}/monitor/showdata/battery/history`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 单体电池 模块列表查询
  batteryBlockList(blockId) {
    return request({
      url: `${API}/monitor/showdata/battery/list?blockId=${blockId}`,
      method: 'get'
    });
  },
  // 单站管理 单体电压监控 查询某个电站能够支持的数据展示维度
  voltDimension(params) {
    return request({
      url: `${API}/monitor/showdata/volt/dimension`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 单体温度监控 查询某个电站能够支持的数据展示维度
  temperatureDimension(params) {
    return request({
      url: `${API}/monitor/showdata/temperature/dimension`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 单体温度监控 数据
  temperatureData(params) {
    return request({
      url: `${API}/monitor/showdata/temperature/data`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 单体电压监控 数据
  voltageData(params) {
    return request({
      url: `${API}/monitor/showdata/volt/data`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 单体电压趋势
  voltageTrend(params) {
    return request({
      url: `${API}/monitor/showdata/volt/trend`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 单体温度趋势
  temperatureTrend(params) {
    return request({
      url: `${API}/monitor/showdata/temperature/trend`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 电压充放电区间
  voltageScope(params) {
    return request({
      url: `${API}/monitor/showdata/volt/day/block/work/scope`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 空调开启时间段
  temperatureScope(params) {
    return request({
      url: `${API}/monitor/showdata/temperature/day/air/scope`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 电表 查询某个电站能够支持的数据展示维度
  meterDimension(params) {
    return request({
      url: `${API}/monitor/showdata/meter/page/list`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 电表 数据
  meterRealtimeData(params) {
    return request({
      url: `${API}/monitor/showdata/meter/realtime`,
      method: 'get',
      data: params,
    });
  },
  // 单站管理 拓扑图 器部件告警信息
  realtimeWarn(stationId) {
    return request({
      url: `${API}/monitor/stationTopologyMap/realtime/warn?stationId=${stationId}`,
      method: 'get',
    });
  },
  //获取状态监控动态表头
  getStatusMonitorTitle() {
    return request({
      url: `${API}/monitor/statusMonitor/getHeader`,
      method: 'get'
    });
  },
  //获取状态监控数据
  getStatusMonitorData() {
    return request({
      url: `${API}/monitor/statusMonitor/listData`,
      method: 'get'
    })
  },
  //分页查询告警规则
  alarmRulePage(params) {
    return request({
      url: `${API}/monitor/warnRule/page`,
      method: 'get',
      data: params,
    });
  },
  //告警状态分类列表
  listWarnType(params) {
    return request({
      url: `${API}/monitor/statusMonitor/listWarnType`,
      method: 'get',
      data: params,
    });
  },
  //模糊查询paramCode
  fuzzyQueryParamCode(params) {
    return request({
      url: `${API}/monitor/warnRule/paramFuzzyQuery`,
      method: 'get',
      data: params,
    });
  },
  // 告警规则 新增
  warnRuleAdd(params) {
    return request({
      url: `${API}/monitor/warnRule`,
      method: 'post',
      data: params,
    });
  },
  // 告警规则 编辑
  warnRuleEdit(params) {
    return request({
      url: `${API}/monitor/warnRule`,
      method: 'put',
      data: params,
    });
  },
  // 告警规则 删除
  warnRuleDel(params) {
    return request({
      url: `${API}/monitor/warnRule` + "?id=" + params,
      method: 'delete',
    });
  },
  //设备参数分页
  getParamDetailPage(params, current, size) {
    return request({
      url: `${API}/monitor/paramDetail/page?current=${current}&size=${size}`,
      method: 'post',
      data: params,
    })
  },
  //模板类别列表
  getModelTypeMap() {
    return request({
      url: `${API}/monitor/paramDetail/modelTypeList`,
      method: 'get',
    })
  },
  //加载设备参数缓存
  loadParamDetailCache() {
    return request({
      url: `${API}/monitor/paramDetail/loadCache`,
      method: 'get',
    })
  },
  //解析计算公式
  parseFunc(params) {
    return request({
      url: `${API}/monitor/paramDetail/parseFunc`,
      method: 'post',
      data: params,
    })
  },
  //更新设备参数
  updateParamDetail(params) {
    return request({
      url: `${API}/monitor/paramDetail`,
      method: 'put',
      data: params,
    })
  },
  //导出设备参数
  exportParamDetail(params) {
    return request({
      url: `${API}/monitor/paramDetail/pdData/download`,
      headers: {
        "octet-stream": true,
        responseType: "blob",
      },
      responseType: "blob",
      method: 'post',
      data: params,
    })
  },
  //查看设备参数pdData列表
  pdDataList(params) {
    return request({
      url: `${API}/monitor/paramDetail/pdData/list`,
      method: 'post',
      data: params,
    })
  },
  //设备参数计算
  calcPdData(params) {
    return request({
      url: `${API}/monitor/pdData/calc`,
      method: 'post',
      data: params,
    })
  },
  //模糊查询电站
  fuzzyQueryStationName(params) {
    return request({
      url: `${API}/monitor/warnRecord/fuzzySelectStation`,
      method: 'get',
      data: params,
    });
  },
  fuzzyQueryLink(params) {
    return request({
      url: `${API}/monitor/warnRule/ruleFuzzyQuery`,
      method: 'get',
      data: params,
    });
  },
  //告警规则状态配置
  statusConfig(params) {
    return request({
      url: `${API}/monitor/warnRule/statusConfig`,
      method: 'post',
      data: params,
    });
  },

  //告警记录获取层级
  getDeviceTreeByStationId(params) {
    return request({
      url: `${API}/monitor/warnRecord/getDeviceTreeByStationId`,
      method: 'get',
      data: params,
    });
  },
  fuzzyQueryRuleName(params) {
    return request({
      url: `${API}/monitor/warnRule/ruleFuzzyQuery`,
      method: 'get',
      data: params,
    });
  },

  //告警确认
  warnConfirm(params) {
    return request({
      url: `${API}/monitor/warnRecord/warnConfirm`,
      method: 'post',
      data: params,
    });
  },
  //批量确认
  warnConfirmBatch(params) {
    return request({
      url: `${API}/monitor/warnRecord/batch/confirm`,
      method: 'post',
      data: params,
    });
  },
  //告警信息列表
  warnInfoPage(params) {
    return request({
      url: `${API}/monitor/warnRecord/page`,
      method: 'get',
      data: params,
    });
  },
  // 通用导出接口
  exportCommon(params) {
    return request({
      url: `${API}/monitor/export/common`,
      method: 'post',
      headers: {
        'octet-stream': true,
        responseType: 'blob',
      },
      responseType: 'blob',
      data: params,
    });
  },
  //反查编辑告警规则
  getWarnRuleById(params) {
    return request({
      url: `${API}/monitor/warnRule/getById`,
      method: 'get',
      data: params,
    });
  },
  //离线记录分页
  offlineRecordPage(params) {
    return request({
      url: `${API}/monitor/equipStatus/page`,
      method: 'get',
      data: params,
    });
  },
  //设备下线记录分页

  //历史离线记录分页
  offlineRecordHistoryPage(params) {
    return request({
      url: `${API}/monitor/equipStatus/history/page`,
      method: 'get',
      data: params,
    });
  },
  // 获取监控集群下的相机实时数据图片
  getCameraImages() {
    return request({
      url: `${API}/base/camera/capture/images`,
      method: "GET"
    });
  },
  //衰减指标
  thermalDecay(params) {
    return request({
      url: `${API}/monitor/showdata/thermalDecay`,
      method: 'get',
      data: params,
    });
  },
  //获取电站总览数据
  stationOverviewData(params) {
    return request({
      url: `${API}/monitor/stationPandect`,
      method: 'get',
      data: params,
    });
  },
  //获取电站总览2
  statisticsData(params) {
    return request({
      url: `${API}/monitor/stationPandect/statistics`,
      method: 'get',
      data: params,
    });
  },
  //获取电站总览3
  statusData(params) {
    return request({
      url: `${API}/monitor/stationPandect/charge/status`,
      method: 'get',
      data: params,
    });
  },
  //电站总览点击置顶
  stationToTop(params) {
    return request({
      url: `${API}/monitor/stationPandect/stationToTop`,
      method: 'get',
      data: params,
    });
  },

  // 电价时段管理 获取省份数据
  elecRuleProvinces() {
    return request({
      url: `${API}/monitor/elecRule/getProvinces`,
      method: 'get',
    });
  },
  // 电价时段管理 新增规则
  addElecRule(params) {
    return request({
      url: `${API}/monitor/elecRule/add`,
      method: 'post',
      data: params,
    });
  },
  // 电价时段管理 编辑规则
  editElecRule(params) {
    return request({
      url: `${API}/monitor/elecRule/edit`,
      method: 'post',
      data: params,
    });
  },
  // 电价时段管理 删除规则
  delElecRule(id) {
    return request({
      url: `${API}/monitor/elecRule?id=${id}`,
      method: 'delete',
    });
  },
  // 电价时段管理 查询
  getElecRule(params) {
    return request({
      url: `${API}/monitor/elecRule/query`,
      method: 'get',
      data: params,
    });
  },
  // 电价时段管理 电价快搜
  elecRuleFastQuery(params) {
    return request({
      url: `${API}/monitor/elecRule/fastQuery`,
      method: 'get',
      data: params,
    });
  },


  //更新分组
  updateProjectGroup(params) {
    return request({
      url: `${API}/monitor/projectGroup/update`,
      method: 'post',
      data: params,
    });
  },
  //修改电站分组
  updateStationGroup(params) {
    return request({
      url: `${API}/monitor/projectGroup/updateStationGroup`,
      method: 'post',
      data: params,
    });
  },
  //添加分组
  addProjectGroup(params) {
    return request({
      url: `${API}/monitor/projectGroup/add`,
      method: 'post',
      data: params,
    });
  },
  //更新电站标签
  updateStationTag(params) {
    return request({
      url: `${API}/monitor/projectGroup/updateStationTag`,
      method: 'get',
      data: params,
    });
  },
  //获取所有电站
  projectGroupStationList(params) {
    return request({
      url: `${API}/monitor/projectGroup/stationList`,
      method: 'get',
      data: params,
    });
  },
  //获取所有项目分组
  projectGroupList(params) {
    return request({
      url: `${API}/monitor/projectGroup/projectGroupList`,
      method: 'get',
      data: params,
    });
  },
  //项目组分页查询
  projectGroupPage(params) {
    return request({
      url: `${API}/monitor/projectGroup/page`,
      method: 'get',
      data: params,
    });
  },
  //获取所有公司
  projectGroupCompanyList(params) {
    return request({
      url: `${API}/projectGroup/companyList`,
      method: 'get',
      data: params,
    });
  },
  //删除项目组
  projectGroupDel(id) {
    return request({
      url: `${API}/monitor/projectGroup?id=${id}`,
      method: 'delete',
    });
  },
  //策略下发分页
  strategyPage(params) {
    return request({
      url: `${API}/monitor/charge/strategy/page`,
      method: 'POST',
      data: params,
    });
  },
  //充放策略电池堆列表查询
  chargeLink(params) {
    return request({
      url: `${API}/monitor/charge/link`,
      method: 'GET',
      data: params,
    });
  },
  //获取充放电策略详情
  chargeStrategyDetail(params) {
    return request({
      url: `${API}/monitor/charge/strategy/time/detail`,
      method: 'GET',
      data: params,
    });
  },
  //获取最后一次策略下发
  getLastDetail(params) {
    return request({
      url: `${API}/monitor/charge/strategy/get/last`,
      method: 'GET',
      data: params,
    });
  },
  //充放电策略下发
  chargeStrategyPublish(params) {
    return request({
      url: `${API}/monitor/charge/strategy/publish`,
      method: 'POST',
      data: params,
    });
  },
  //重新下发策略
  againPublish(params) {
    return request({
      url: `${API}/monitor/charge/try/again/publish`,
      method: 'GET',
      data: params
    });
  },
  //查询电池堆计量点信息
  pointFind(params) {
    return request({
      url: `${API}/monitor/energyLink/point/find`,
      method: 'GET',
      data: params,
    });
  },
  //计量点配置
  pointSet(params) {
    return request({
      url: `${API}/monitor/energyLink/point/set`,
      method: 'POST',
      data: params,
    });
  },
  //设置项查询
  ccuItem(params) {
    return request({
      url: `${API}/monitor/charge/get/ccu/item`,
      method: 'GET',
      data: params,
    });
  },
  //设置值
  setItem(params, url) {
    return request({
      url: `${API}/monitor/charge/set/ccu${url}`,
      method: 'POST',
      data: params,
    });
  },
  // 策略导入
  strategyImport() {
    return request({
      url: `${API}/monitor/charge/strategy/import`,
      method: 'post',
    });
  },
  //备注保存
  strategyRemark(params) {
    return request({
      url: `${API}/monitor/charge/strategy/remark`,
      method: 'GET',
      data: params,
    });
  },
  //删除策略
  strategyDelete(params) {
    return request({
      url: `${API}/monitor/charge/strategy/delete`,
      method: 'GET',
      data: params,
    });
  },
  //判断是否超过最大可填功率
  checkDemand(params) {
    return request({
      url: `${API}/monitor/charge/check/demand`,
      method: 'GET',
      data: params,
    });
  },
  //查询需量
  checkLinkDemand(params) {
    return request({
      url: `${API}/monitor/companyStation/get/demand`,
      method: 'GET',
      data: params,
    });
  },
  //查询总需量
  checkTotalDemand(params) {
    return request({
      url: `${API}/monitor/companyStation/get/total/demand`,
      method: 'GET',
      data: params,
    });
  },
  // 动态需量
  dynamicDemand(params) {
    return request({
      url: `${API}/monitor/dynamic/demand/curve/everyday`,
      method: 'GET',
      data: params,
    });
  },
  // 动态需量 设置开关
  setDemandSwitch(params) {
    return request({
      url: `${API}/monitor/dynamic/demand/switch/set`,
      method: 'GET',
      data: params,
    });
  },
  // 动态需量 获取开关
  getDemandSwitch(params) {
    return request({
      url: `${API}/monitor/dynamic/demand/switch/get`,
      method: 'GET',
      data: params,
    });
  },
  // 动态需量 获取需量推荐值
  getDemandSuggest(params) {
    return request({
      url: `${API}/monitor/dynamic/demand/get/suggest`,
      method: 'GET',
      data: params,
    });
  },
  // 动态需量 获取历史推荐需量曲线
  getDemandHistorySuggest(params) {
    return request({
      url: `${API}/monitor/dynamic/demand/get/history/suggest`,
      method: 'GET',
      data: params,
    });
  },
  // 动态需量 手动计算每日动态需量
  demandCalc(params) {
    return request({
      url: `${API}/monitor/dynamic/demand/calc`,
      method: 'GET',
      data: params,
    });
  },
  // 动态需量 是否展示需量提示tips
  demandExceed(params) {
    return request({
      url: `${API}/monitor/dynamic/demand/get/exceed`,
      method: 'GET',
      data: params,
    });
  },
  // 现货模式-运行策略导入
  importStrategyModel(params) {
    return request({
      url: `${API}/monitor/spotMarket/importStrategyModel`,
      method: 'post',
      data: params,
    });
  },
  //现货模式-日前价格导入
  importDayPriceModel(params) {
    return request({
      url: `${API}/monitor/spotMarket/importDayPriceModel`,
      method: 'post',
      data: params,
    });
  },
  //现货模式-获取曲线
  getLines(params) {
    return request({
      url: `${API}/monitor/spotMarket/getLines`,
      method: 'GET',
      data: params,
    });
  },

  //市场供需情况
  loadinfoMarket(params) {
    return request({
      url: `${API}/monitor/spotMarket/market`,
      method: 'POST',
      data: params
    })
  },
  //市场价格趋势
  priceinfoMarket(params) {
    return request({
      url: `${API}/monitor/spotMarket/priceinfo/priceselect`,
      method: 'POST',
      data: params,
    })
  },
  ///温度列表
  templist(params) {
    return request({
      url: `${API}/monitor/spotMarket/templist`,
      method: 'POST',
      data: params,
    })
  },
  //城市温度
  citylist(params) {
    return request({
      url: `${API}/monitor/spotMarket/citylist`,
      method: 'GET',
      data: params,

    })
  },

  //负荷信息
  loadinfoAllListMarket(params) {
    return request({
      url: `${API}/monitor/spotMarket/list`,
      method: 'POST',
      data: params
    })
  },
  // 申报策略 新增用户申报策略
  applyStrategy(params) {
    return request({
      url: `${API}/monitor/apply/strategy`,
      method: 'post',
      data: params,
    });
  },
  // 申报策略 申报策略分页
  applyStrategyList(params) {
    return request({
      url: `${API}/monitor/apply/strategy/page`,
      method: 'get',
      data: params,
    });
  },
  // 申报策略 申报策略查询详情
  applyStrategyDetails(id) {
    return request({
      url: `${API}/monitor/apply/strategy/details/${id}`,
      method: 'get',
    });
  },
  // 申报策略 基线导入
  importBaseCost(params) {
    return request({
      url: `${API}/monitor/apply/strategy/importBaseCost`,
      method: 'post',
      data: params,
    });
  },
  // 申报策略 电量数据导入
  importCustomCost(params) {
    return request({
      url: `${API}/monitor/apply/strategy/importCustomCost`,
      method: 'post',
      data: params,
    });
  },
  // 申报策略 修改申报响应数据
  setStrategy(params) {
    return request({
      url: `${API}/monitor/apply/strategy/command`,
      method: 'put',
      data: params,
    });
  },
  //户号分页查询
  elecAccManagePage(params) {
    return request({
      url: `${API}/monitor/elecAccManage/page`,
      method: 'get',
      data: params,
    });
  },
  //户号导入
  uploadExcel(params) {
    return request({
      url: `${API}/monitor/elecAccManage/uploadExcel`,
      method: 'post',
      data: params,
    });
  },
  //删除户号
  deleteElecAccManage(id) {
    return request({
      url: `${API}/monitor/elecAccManage/delete?id=${id}`,
      method: 'delete',
    });
  },
  //新增户号
  addElecAccManage(params) {
    return request({
      url: `${API}/monitor/elecAccManage/add`,
      method: 'post',
      data: params,
    });
  },
  //编辑户号
  editElecAccManage(params) {
    return request({
      url: `${API}/monitor/elecAccManage/edit`,
      method: 'post',
      data: params,
    });
  },
  //设备消息饼图
  equipStatusStatistics() {
    return request({
      url: `${API}/monitor/equipStatus/statistics`,
      method: 'get',
    });
  },
  //设备在/离线消息
  equipStatusDetail() {
    return request({
      url: `${API}/monitor/equipStatus/detail`,
      method: 'get',
    });
  },
  //请求是否显示指令模式
  showMode(params) {
    return request({
      url: `${API}/monitor/charge/gt/show/mode`,
      method: 'get',
      data: params,
    });
  },
  //获取当前模式
  getPowercmd(params) {
    return request({
      url: `${API}/consumer/powercmd/get`,
      method: 'get',
      data: params,
    });
  },
  //下发模式
  pubPowercmd(params) {
    return request({
      url: `${API}/consumer/powercmd/pub`,
      method: 'get',
      data: params,
    });
  },
  //首页大屏接口，暂时请求旧接口，后期更改
  //接入总览
  statsData(params) {
    return request({
      url: `${API}/monitor/v2/company/stats/data`,
      method: 'GET',
      data: params,

    })
  },
  emsCompanyList(params) {
    return request({
      url: `${API}/monitor/v2/company/company/list`,
      method: 'GET',
      data: params
    })
  },
  //查询储能企业状况
  esData(params) {
    return request({
      url: `${API}/monitor/v2/company/es/data`,
      method: 'GET',
      data: params
    })
  },
  //获取摄像头数量
  //首页查询参数日曲线数据
  cameraNum(params) {
    return request({
      url: `${API}/monitor/v2/company/camera/num`,
      method: 'GET',
      data: params
    })
  },
  //温度曲线
  tempCurve(params) {
    return request({
      url: `${API}/monitor/ems/tempdata/curve`,
      method: 'GET',
      data: params
    })
  },
  //请求各个省份所有项目
  companyProvStats() {
    return request({
      url: `${API}/monitor/v2/company/prov/stats`,
      method: 'GET',
      data: {}
    })
  },
  //首页查询参数日曲线数据
  newCurveDayList(params) {
    return request({
      url: `${API}/monitor/ems/power/curve`,
      method: 'GET',
      data: params
    })
  },
  //查询企业已授权的电站
  stationAuthList(params) {
    return request({
      url: `${API}/monitor/v2/company/station/auth/list`,
      method: 'GET',
      data: params
    })
  },
  // 工单管理 工单列表
  workOrderList(params) {
    return request({
      url: `${API}/monitor/workOrder/page?current=${params.current}&size=${params.size}`,
      method: 'post',
      data: params,
    });
  },
  // 工单管理 工单数量
  workOrderCount(params) {
    return request({
      url: `${API}/monitor/workOrder/stateCount`,
      method: 'post',
      data: params,
    });
  },
  // 工单管理 新增工单
  addWorkOrder(params) {
    return request({
      url: `${API}/monitor/workOrder/save`,
      method: 'post',
      data: params,
    });
  },
  // 工单管理 新增工作票
  addTicket(params) {
    return request({
      url: `${API}/monitor/workOrder/ticket`,
      method: 'post',
      data: params,
    });
  },
  //删除工作票
  deleteTicket(id) {
    return request({
      url: `${API}/monitor/workOrder/${id}`,
      method: 'DELETE',
    });
  },
  //工作票操作记录
  ticketDealLog(params) {
    return request({
      url: `${API}/monitor/workOrder/ticket/dealLog?current=${params.current}&size=${params.size}`,
      method: 'post',
      data: params,
    });
  },
  // 工单管理 工单详情
  workOrderDetail(id) {
    return request({
      url: `${API}/monitor/workOrder/detail/${id}`,
      method: 'get',
    });
  },
  // 工单管理 处理
  dealWorkOrder(params) {
    return request({
      url: `${API}/monitor/workOrder/deal`,
      method: 'post',
      data: params
    });
  },
  // 工单管理 认领
  claimWorkOrder(params) {
    return request({
      url: `${API}/monitor/workOrder/claim`,
      method: 'post',
      data: params
    });
  },// 工单管理 确认
  confirmWorkOrder(params) {
    return request({
      url: `${API}/monitor/workOrder/confirm`,
      method: 'post',
      data: params
    });
  },
  // 工单管理 审核
  approveWorkOrder(params) {
    return request({
      url: `${API}/monitor/workOrder/approve`,
      method: 'post',
      data: params
    });
  },
  // 工单管理 编辑工单（巡检表单）
  editWorkorder(params) {
    return request({
      url: `${API}/monitor/workOrder/editWorkOrder`,
      method: 'put',
      data: params
    });
  },
  // 工单管理 工作票分页
  ticketPage(params) {
    return request({
      url: `${API}/monitor/workOrder/ticket/page?current=${params.current}&size=${params.size}`,
      method: 'post',
      data: params
    });
  },
  // 工单管理 工作票延期
  ticketDelay(params) {
    return request({
      url: `${API}/monitor/workOrder/ticket/delay`,
      method: 'post',
      data: params
    });
  },
  // 工单管理 工作票审核
  ticketApprove(params) {
    return request({
      url: `${API}/monitor/workOrder/ticket/approve`,
      method: 'post',
      data: params
    });
  },
  // 工单管理 工作票延期审核
  ticketDelayApprove(params) {
    return request({
      url: `${API}/monitor/workOrder/ticket/delayApprove`,
      method: 'post',
      data: params
    });
  },
  // 工单管理 工作票预览
  ticketDetail(id) {
    return request({
      url: `${API}/monitor/workOrder/ticket/detail/${id}`,
      method: 'get',
    });
  },
  // 工单管理 工作票审核
  ticketClose(params) {
    return request({
      url: `${API}/monitor/workOrder/ticket/close`,
      method: 'post',
      data: params
    });
  },
  // 单站管理 设备检测 热管理
  hotManage(stationId, blockId) {
    return request({
      url: `${API}/monitor/showdata/hotManage/realtime?stationId=${stationId}&blockId=${blockId}`,
      method: 'get',
    });
  },
  //故障信息配置
  faultConfig(params) {
    return request({
      url: `${API}/monitor/faultConfig`,
      method: 'put',
      data: params
    });
  },
  //获取故障配置列表
  faultConfigList(params) {
    return request({
      url: `${API}/monitor/faultConfig/list`,
      method: 'POST',
      data: params
    });
  },
  //新增故障配置
  faultConfigPost(params) {
    return request({
      url: `${API}/monitor/faultConfig`,
      method: 'POST',
      data: params
    });
  },
  //故障配置删除
  faultConfigDel(params) {
    return request({
      url: `${API}/monitor/faultConfig`,
      method: 'DELETE',
      data: params
    });
  },
  //新增/编辑故障处理
  faultDealSaveOrUpdate(params) {
    return request({
      url: `${API}/monitor/faultDeal/saveOrUpdate`,
      method: 'POST',
      data: params
    });
  },
  //关联工单
  faultDealRelate(params) {
    return request({
      url: `${API}/monitor/faultDeal/relate`,
      method: 'POST',
      data: params
    });
  },
  //导入 planShutdown是否计划停运  1：是 0：否
  faultDealImportData(params, planShutdown) {
    return request({
      url: `${API}/monitor/faultDeal/importData?planShutdown=${planShutdown}`,
      method: 'POST',
      data: params
    });
  },
  //分页
  faultDealPage(params) {
    return request({
      url: `${API}/monitor/faultDeal/page?current=${params.current}&size=${params.size}`,
      method: 'POST',
      data: params
    });
  },
  //导出
  faultDealExportData(params) {
    return request({
      url: `${API}/monitor/faultDeal/exportData`,
      method: 'POST',
      headers: {
        'octet-stream': true,
        responseType: 'blob',
      },
      responseType: 'blob',
      data: params
    });
  },
  //删除
  faultDealDel(id) {
    return request({
      url: `${API}/monitor/faultDeal/${id}`,
      method: 'DELETE',
    });
  },
  // 停运看板
  faultDealDashboard(selectType, params) {
    return request({
      url: `${API}/monitor/faultDeal/dashboard/${selectType}`,
      method: 'POST',
      data: params
    });
  },
  //运行日志-重新计算
  repeatCompute(params) {
    return request({
      url: `${API}/monitor/stationRunLog/repeatCompute`,
      method: 'POST',
      data: params
    });
  },
  //运行日志-分页
  stationRunLogPage(params) {
    return request({
      url: `${API}/monitor/stationRunLog/page?current=${params.current}&size=${params.size}`,
      method: 'POST',
      data: params
    });
  },

  //运行日志-导出
  stationRunLogExportData(params) {
    return request({
      url: `${API}/monitor/stationRunLog/exportStationRunLog`,
      method: 'POST',
      headers: {
        'octet-stream': true,
        responseType: 'blob',
      },
      responseType: 'blob',
      data: params
    });
  },
  //运行日志-列表
  stationRunLogList(params) {
    return request({
      url: `${API}/monitor/stationRunLog/list`,
      method: 'POST',
      data: params
    });
  },
  //运行操作记录-分页
  operateLogPage(params) {
    return request({
      url: `${API}/monitor/operateLog/page?current=${params.current}&size=${params.size}`,
      method: 'POST',
      data: params
    });
  },
  //运行操作记录-新增
  operateLogSave(params) {
    return request({
      url: `${API}/monitor/operateLog/saveOrUpdate`,
      method: 'POST',
      data: params
    });
  },
  //运行操作记录-列表
  operateLogList(params) {
    return request({
      url: `${API}/monitor/operateLog/list`,
      method: 'POST',
      data: params
    });
  },
  //运行操作记录-导入
  operateLogImportData(params) {
    return request({
      url: `${API}/monitor/operateLog/importOperateLog`,
      method: 'POST',
      data: params
    });
  },
  //运行操作记录-导出
  operateLogExportData(params) {
    return request({
      url: `${API}/monitor/operateLog/exportOperateLog`,
      method: 'POST',
      headers: {
        'octet-stream': true,
        responseType: 'blob',
      },
      responseType: 'blob',
      data: params
    });
  },
  // 现货模式 参数配置 新增企业
  sellStorageAdd(stationId) {
    return request({
      url: `${API}/monitor/sell/storage/company/add?stationId=${stationId}`,
      method: 'get',
    });
  },
  // 现货模式 参数配置 编辑企业
  sellStorageSetTime(params) {
    return request({
      url: `${API}/monitor/sell/storage/company/set/time`,
      method: 'post',
      data: params
    });
  },
  // 现货模式 参数配置 获取售储企业
  sellStorageList() {
    return request({
      url: `${API}/monitor/sell/storage/company/list`,
      method: 'get',
    });
  },
  // 现货模式 根据日期获取售储企业
  incomeStorageCompanyList(params) {
    return request({
      url: `${API}/monitor/sell/storage/income/company/list`,
      method: 'post',
      data: params
    });
  },
  // 现货模式 参数配置 年度参数配置
  sellStorageYearList(params) {
    return request({
      url: `${API}/monitor/sell/storage/year/page`,
      method: 'post',
      data: params
    });
  },
  // 现货模式 参数配置 年度参数导入
  sellStorageYeaImport(params) {
    return request({
      url: `${API}/monitor/sell/storage/year/import`,
      method: 'post',
      data: params
    });
  },
  // 现货模式 参数配置 月度参数配置
  sellStorageMonthList(params) {
    return request({
      url: `${API}/monitor/sell/storage/month/page`,
      method: 'post',
      data: params
    });
  },
  // 现货模式 参数配置 月度参数导入
  sellStorageMonthImport(params) {
    return request({
      url: `${API}/monitor/sell/storage/month/import`,
      method: 'post',
      data: params
    });
  },
  // 告警管理 储充告警记录
  chargeEvtList(params) {
    return request({
      url: `${API}/monitor/charge/evt/page`,
      method: 'get',
      data: params
    });
  },
  // 告警管理 储充告警记录 确认告警
  chargeEvtWarnConfirm(params) {
    return request({
      url: `${API}/monitor/charge/evt/warnConfirm`,
      method: 'post',
      data: params
    });
  },
  //售储结合后综合收益、储能收益、售电收益等
  incomePlate(params) {
    return request({
      url: `${API}/monitor/sell/storage/income/plate`,
      method: 'post',
      data: params
    });
  },
  // 储充大屏 地图信息
  stationcityInfoStatistics() {
    return request({
      url: `${API}/monitor/res/charging/stationCityInfoStatistics`,
      method: 'post',
    });
  },
  // 储充大屏 地图信息
  gunRealTimeStatistics() {
    return request({
      url: `${API}/monitor/res/charging/gunRealTimeStatistics`,
      method: 'post',
    });
  },
  // 储充大屏 统计数据
  orderStatistics() {
    return request({
      url: `${API}/monitor/res/charging/orderStatistics`,
      method: 'get',
    });
  },

  //获取有售储企业的省份
  dazzlingProv(params) {
    return request({
      url: `${API}/monitor/sell/storage/dazzling/prov`,
      method: 'GET',
      data: params
    });
  },
  //获取售储数据明细
  dazzlingMap(params) {
    return request({
      url: `${API}/monitor/sell/storage/dazzling/map`,
      method: 'GET',
      data: params
    });
  },
  //排行榜
  dazzlingRsanking(params) {
    return request({
      url: `${API}/monitor/sell/storage/dazzling/ranking`,
      method: 'GET',
      data: params
    });
  },
  //大屏售储收益统计
  dazzlingStat(params) {
    return request({
      url: `${API}/monitor/sell/storage/dazzling/stat`,
      method: 'GET',
      data: params
    });
  },
  //收益看板-导出
  incomeExportData(params) {
    return request({
      url: `${API}/monitor/sell/storage/income/exportData`,
      method: 'POST',
      headers: {
        'octet-stream': true,
        responseType: 'blob',
      },
      responseType: 'blob',
      data: params
    });
  },
  //获取生产厂家类别
  equipmentManufacturer() {
    return request({
      url: `${API}/monitor/supplierType/equipmentManufacturer`,
      method: 'GET',
    });
  },
  // 获取报文解析 下拉框
  mqttAclNewPayloadType(id) {
    return request({
      url: `${API}/monitor/mqttAclNew/payload/type?id=${id}`,
      method: 'GET',
    });
  },
  // 获取报文解析 报文数据
  mqttAclNewPayload(id, key) {
    return request({
      url: `${API}/monitor/mqttAclNew/payload?id=${id}&code=${key}`,
      method: 'GET',
    });
  },
  // 设备型号列表
  equipModelPage(params) {
    return request({
      url: `${API}/monitor/equipModel/page`,
      method: 'post',
      data: params
    });
  },
  // 新增型号列表
  addEquipModelPage(params) {
    return request({
      url: `${API}/monitor/equipModel/add`,
      method: 'post',
      data: params
    });
  },
  // 修改型号列表
  editEquipModelPage(params) {
    return request({
      url: `${API}/monitor/equipModel/edit`,
      method: 'post',
      data: params
    });
  },
  // 删除型号列表
  deleteEquipModelPage(id) {
    return request({
      url: `${API}/monitor/equipModel/delete?id=${id}`,
      method: 'get',
    });
  },
  // 获取生产厂家类别
  getManufacturerEnum() {
    return request({
      url: `${API}/monitor/companyStation/manufacturer/enum`,
      method: 'get',
    });
  },
  //强制修改密码
  forceUpdatePwd(id) {
    return request({
      url: `${API}/base/user/userPwdExpire/${id}`,
      method: 'GET',

    });
  }
}





export default api;